package com.up360.rapidcalc.aerolite.servers
{
    import com.up360.rapidcalc.aerolite.AeroliteCrisis;
    import com.up360.rapidcalc.aerolite.swc.TopicUI;
    import com.up360.rapidcalc.aerolite.util.LayerManager;
    
    import flash.display.Sprite;
    import flash.geom.Point;
    import flash.text.TextFieldAutoSize;

    /**
     * @author Tunie
     * @date   May 6, 2013
     * 题干
     */
    public class TopicServer
    {
        private var _ui:TopicUI;
        public function TopicServer(ui:TopicUI)
        {
            _ui=ui;
        }
        
        /**
         *更新题干 
         * @param message
         */
        public function update(message:String):void
        {
            _ui.txtTopic.text=message;
            _ui.txtTopic.autoSize=TextFieldAutoSize.CENTER;
        }
        
        /**
         *显示题干 
         * @param container
         * @param local
         */
        public function show(x:Number,y:Number):void
        {
            _ui.x=x;
            _ui.y=y;
            AeroliteCrisis.instance.layerManager.add(_ui,LayerManager.GAME);
        }
    }
}